package com.tz.actions;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;

/**
 * Created by Administrator on 2016/9/29.
 */
@Namespace(value = "/")
public class OgnlAction extends ActionSupport{
    private String name;
    private int age;

    @Action(value = "demo1")
    public String demo1(){
        System.out.println("name:"+name);
        System.out.println("age:"+age);
    return SUCCESS;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {

        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
